<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      template="/web/layout/arearestrita.xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
	
	<ui:define name="bodyPrincipal">
		<p:panel columns="2" style="width:100%">
			<f:facet name="header">
				<h:panelGrid columns="2" style="width:100%">
					<h:panelGrid style="width:100%;text-align:left">
						<h:outputText style="font-size:25px" value="LICITACOES" />
					</h:panelGrid>
					<h:panelGrid style="width:100%;text-align:right">
						<p:commandLink value="NOVA"
							action="#{licitacaoBeanSession.novaLicitacao}" />	
					</h:panelGrid>
				</h:panelGrid>
			</f:facet>
			<p:dataTable id="panelAreaRestritaLicitacoes" paginator="true"
				rows="20" emptyMessage="Nenhuma Licitacao Cadastrada"
				style="text-align:center"
				value="#{licitacaoBeanSession.licitacaoList}" var="l">
				<p:column style="width:250px" headerText="Processo"
					filterBy="#{l.processo}" filterMatchMode="contains">
					<p:commandLink
						action="#{licitacaoBeanSession.abrirLicitacaoSelecionada()}">
						<h:outputText value="#{l.processo}" />
						<f:setPropertyActionListener
							target="#{licitacaoBeanSession.licitacaoSelecionada}"
							value="#{l}" />
					</p:commandLink>
				</p:column>
				<p:column style="width:150px" headerText="Modalidade">
					<h:outputText value="#{l.modalidade.nome}" />
				</p:column>

			</p:dataTable>
		</p:panel>
	</ui:define>

</ui:composition>